import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

const store = new Vuex.Store({
  state:{
    studentFrom:'',
    phoneNum:'',
    havePass:false,
    haveLogin:false,
    canBack:true,
    headerShow:true
  },
  getters:{
    GetStudentFrom:state=>state.studentFrom,
    GetPhoneNum:state=>state.phoneNum,
    GetHavePass:state=>state.havePass,
    GetHaveLogin:state=>state.haveLogin,
    GetCanBack:state=>state.canBack,
    GetHeaderShow:state=>state.headerShow
  },
  mutations:{
    SetStudentFrom(state,val){
      state.studentFrom = val;
    },
    SetPhoneNum(state,val){
      state.phoneNum = val;
    },
    SetHavePass(state,val){
      state.havePass = val;
    },
    SetHaveLogin(state,val){
      state.haveLogin = val;
    },
    SetCanBack(state,val){
      state.canBack = val;
    },
    SetHeaderShow(state,val){
      state.headerShow = val;
    }
  }
})

export default store
